package com.pdg.mcplugin.questfor.config;

import org.bukkit.command.CommandSender;

import com.pdg.mcplugin.common.deprecated.DeprecatedPermissionCheckerBase;
import com.pdg.mcplugin.questfor.QuestFor;

public class PermissionChecker extends DeprecatedPermissionCheckerBase<QuestFor> {
	
	public final static String PERMISSION_QUEST = "questfor.quest";
	public final static String PERMISSION_LIST = "questfor.list";
	public final static String PERMISSION_LEVELS = "questfor.levels";

	public PermissionChecker(QuestFor thePlugin) {
		super(thePlugin);
		this.setDefault(PERMISSION_QUEST, false);
		this.setDefault(PERMISSION_LIST, true);
		this.setDefault(PERMISSION_LEVELS, false);
	}
	
	public boolean hasQuestPermission(CommandSender theCommandSender){
		return this.checkPermission(theCommandSender, PERMISSION_QUEST);
	}

	public boolean hasListPermission(CommandSender theCommandSender){
		return this.checkPermission(theCommandSender, PERMISSION_LIST);
	}

	public boolean hasLevelsPermission(CommandSender theCommandSender){
		return this.checkPermission(theCommandSender, PERMISSION_LEVELS);
	}

	@Override
	protected boolean shouldSuppressNoPermissionMessages(
			String thePermissionName) {
		return false;
	}

}
